home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: wells2@ix.netcom.com (wells)
- Newsgroups: comp.lang.c++
- Subject: emergency! need help with this now. please.
- Date: Thu, 22 Feb 1996 03:35:27 GMT
- Organization: Netcom
- Message-ID: <4ggqna$571@ixnews6.ix.netcom.com>
- NNTP-Posting-Host: irv-ca9-08.ix.netcom.com
- X-NETCOM-Date: Wed Feb 21 8:16:42 PM PST 1996
- X-Newsreader: Forte Free Agent 1.0.82
-
-
-
- why doesnt this work???? I need it for my class tommorow.
-
- help please , thanks edward
-
-
-
- #include <stdio.h>
- #include <iostream.h>
- #include <math.h>
-
- void main(void)
-
- {
-
- float l; // loan amount
- float r; // interest rate
- int n; // number of payments
- float p; // payment
- float a,b,c,d;
-
- cout << "Enter the full loan amount ->";
- cin >> l;
- cout << "\n Enter the interest rate ->";
- cin >> r;
- cout << "\n Enter the number of payments ->";
- cin >> n;
-
- r=r/1200;
-
- a=(l+r);
- b=pow(a,n)*r;
-
- c=(l+r);
- d=pow(c,n)-1;
- p=((b/d)*l);
-
- cout << p;
-
- }
-
-
-
-